package com.tk.itext7demo.utils.excel;

import com.itextpdf.kernel.pdf.PdfDocument;
import com.itextpdf.kernel.pdf.PdfWriter;

import java.io.FileNotFoundException;
import java.io.OutputStream;

/**
 * @program: easy
 * @description:
 * @author: tjw
 * @create: 2022-11-10 16:11
 **/
public class PdfTool {
    //
    protected PdfDocument document;
    //
    protected OutputStream out;

    public PdfDocument getDocument() throws FileNotFoundException {
        if (document == null) {
            document = new PdfDocument(new PdfWriter(out));
        }
        return document;
    }
}
